/**
 * Dec 21, 2011 8:50:37 AM
 * com.kratonsolution.cbs.security.dm.impl
 * Module.java
 */
package com.kratonsolution.belian.security.api.dm;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

import com.kratonsolution.belian.kernel.dm.IAuditable;
import com.kratonsolution.belian.kernel.dm.Model;

/**
 * @author Agung Dodi Perdana
 * @email agung.dodi.perdana@gmail.com
 * @Version Sinch 0.0.1
 */
@Entity
@Table(name="cbs_security_module")
public class Module extends Model implements IAuditable
{
    private static final long serialVersionUID = 4112999503836128218L;
    
    @Column(name="code",unique=true,nullable=false)
    private String code;
    
    @Column(name="name",nullable=false,unique=true)
    private String name;
    
    @Column(name="note")
    private String note;
    
    @Column(name="is_enabled")
    @Type(type="yes_no")
    private boolean enabled;
    
    public Module(){}

    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return this.name;
    }

    public void setEnabled(boolean enabled)
    {
        this.enabled = enabled;
    }

    public boolean isEnabled()
    {
        return this.enabled;
    }

    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode()
    {
        return this.code;
    }
    
    public String getNote()
    {
        return note;
    }

    public void setNote(String note)
    {
        this.note = note;
    }
}